import { axiosRequest } from '@/utils/request'
import { lcglModulePrefix } from '../../config'

/**
 * 查询
 * @param {*} param
 */
export const getList = (param) => {
  return axiosRequest(`${lcglModulePrefix}/process/getProcessPage`, '查询', 'GET', param)
}

/**
 * 激活/失效
 * @param {*} param
 */
export const handleStatus = (param, type) => {
  return axiosRequest(`${lcglModulePrefix}/process/status/${param.processonDefinitionId}/${type}`, '激活/失效', 'PUT', {})
}

/**
 * 发起流程
 * @param {*} param
 */
export const handleStartProcess = (param) => {
  return axiosRequest(`${lcglModulePrefix}/process/submit/${param.deploymentId}`, '发起流程', 'POST', {})
}

/**
 * 删除
 * @param {*} param
 */
export const handleDel = (param) => {
  return axiosRequest(`${lcglModulePrefix}/process/deleteProcIns/${param.deploymentId}`, '删除', 'DELETE', {})
}
